import request from "@/utils/request";

// 查询价格方案列表
export function listPlan(query) {
  return request({
    url: "/pricingPlan/list",
    method: "get",
    params: query,
  });
}

// 查询价格方案详细
export function getPlan(id) {
  return request({
    url: "/pricingPlan/" + id,
    method: "get",
  });
}

// 新增价格方案
export function addPlan(data) {
  return request({
    url: "/pricingPlan",
    method: "post",
    data: data,
  });
}

// 修改价格方案
export function updatePlan(data) {
  return request({
    url: "/pricingPlan",
    method: "put",
    data: data,
  });
}

// 获取产品下拉列表
export function selectProductList() {
  return request({
    url: "/pricingPlan/productList",
    method: "get",
  });
}

// 删除价格方案
export function delPricingPlan(id) {
  return request({
    url: "/pricingPlan/" + id,
    method: "delete",
  });
}

// 删除价格方案
export function getIsUsed(id) {
  return request({
    url: "/pricingPlan/getIsUsed?id=" + id,
    method: "get",
  });
}
